package com.example.springrabbitmq.listener;

import com.example.springrabbitmq.model.MessageInfo;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class TestListener {
    @RabbitListener(queues = "hello")
    public void queueListener(MessageInfo messageInfo) {
        System.out.println("接收到消息:" + messageInfo);
    }
}
